Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates verification results so they reflect newly registered mock interactions, aligning VerificationResult behavior with dynamic interaction recording in Mockolate.
Changes:
- Refactors
VerificationResult<T>to store a predicate and recompute matching interactions on eachVerifycall. - Updates verification registration to pass predicates instead of precomputed interaction arrays.
- Adds/updates tests covering verification updates over time and interaction registration notifications.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Mockolate.Tests/Verify/VerificationResultExtensionsTests.cs | Updates VerificationResult construction to match the new constructor signature. |
| Tests/Mockolate.Tests/Verify/MockVerifyTests.cs | Adds a test ensuring IVerificationResult reflects interactions added after the result is created. |
| Tests/Mockolate.Tests/ItTests.MatchesTests.cs | Ensures regex timeout is exercised by executing the verification (AtLeastOnce). |
| Tests/Mockolate.Tests/Interactions/MockInteractionsTests.cs | Adds tests for interaction registration and the new notification event. |
| Tests/Mockolate.Api.Tests/Expected/Mockolate_netstandard2.0.txt | Updates expected public API surface (constructor signature + new event). |
| Tests/Mockolate.Api.Tests/Expected/Mockolate_net8.0.txt | Updates expected public API surface (constructor signature + new event). |
| Tests/Mockolate.Api.Tests/Expected/Mockolate_net10.0.txt | Updates expected public API surface (constructor signature + new event). |
| Source/Mockolate/Verify/VerificationResult.cs | Implements predicate-based matching and recomputation on Verify. |
| Source/Mockolate/MockRegistration.Verify.cs | Switches verification result creation to pass predicates instead of snapshots. |
| Source/Mockolate/Interactions/MockInteractions.cs | Adds an InteractionAdded notification and raises it when registering interactions. |
🚀 Benchmark ResultsDetails
|
|
|
This is addressed in release v1.5.0. |



This PR updates verification results so they reflect newly registered mock interactions, aligning
VerificationResultbehavior with dynamic interaction recording in Mockolate.Key Changes:
VerificationResult<T>to store a predicate and recompute matching interactions on eachVerifycall..Within(TimeSpan timeout)when verifing interactions #494